<?php

namespace App\HttpController;

use EasySwoole\Http\AbstractInterface\Controller;
use EasySwoole\Session\FileSessionHandler;
use EasySwoole\Session\Test\RedisHandler;


abstract class BaseController extends Controller{
	
	function fetch($template = '',$data = []){
		
    	$instance = \EasySwoole\EasySwoole\Config::getInstance();
    	$t = new \think\Template();
		$t->config($instance->getConf('TEMPLATE'));
		$t->fetch($template,$data);
	  	$content = ob_get_clean();
        $this->response()->write($content);
    }
	
}



